import fetch from 'common/src/utils/fetch';
import baseUrl from './env';
// 录入列表
function getList(data) {
  return fetch({
      url: `${baseUrl}/permission/listPermission`,
      method: 'post',
      data
  });
}
// 新增
function addPower(data) {
  return fetch({
      url: `${baseUrl}/permission/insertPermission`,
      method: 'post',
      data
  });
}
// 编辑
function editPower(data) {
  return fetch({
      url: `${baseUrl}/permission/updatePermission`,
      method: 'post',
      data
  });
}
// 删除
function deletePower(data) {
  return fetch({
      url: `${baseUrl}/permission/deletePermission`,
      method: 'post',
      data
  });
}
// 改变权限
function changeStatus(data) {
  return fetch({
      url: `${baseUrl}/permission/changeStatus`,
      method: 'post',
      data
  });
}
const permissionMangeApi = {
  getList,
  addPower,
  editPower,
  deletePower,
  changeStatus
}
export default permissionMangeApi;
